﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Exhibition.Dao.ViewModel;
using Exhibition.Service;

namespace Exhibition.UserCenter
{
    public partial class SysMessage : BaseUserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                GetMessageInfo();
            }
        }

        private void GetMessageInfo()
        {
            int outcount=0;
            List<MessageInfoModel> mdls = CenterService.messageInfoService.GetList("",LoginUser.Id.ToString(),stmd.Id,pager.StartRecordIndex-1,pager.PageSize,out outcount);
            pager.RecordCount = outcount;
            repList.DataSource = mdls;
            repList.DataBind();
        }

        protected void pager_PageChanged(object sender, EventArgs e)
        {
            GetMessageInfo();
        }
    }
}